package com.zhongfl.crm.lixiao.bean.resolve;

import com.heptagram.lixiao.bean.response.LXDepartmentResponse;
import com.zhongfl.crm.model.LxDepartment;

/**
 * @author wang.yuchuan
 * @date 2018/6/24
 */
public class DepartmentModelResolver implements ModelResolver<LxDepartment, LXDepartmentResponse.Department> {
    @Override
    public LxDepartment resolve(LXDepartmentResponse.Department obj) {
        LxDepartment lxDepartment = new LxDepartment();
        lxDepartment.setLxId(obj.getId());
        lxDepartment.setLevel(obj.getLevel());
        lxDepartment.setParentId(obj.getParentId());
        lxDepartment.setName(obj.getName());
        lxDepartment.setCreatedBy("System");
        lxDepartment.setModifiedBy("System");
        return lxDepartment;
    }
}
